import { i18n } from '@/i18n';
import {
  ProductKeyM1,
  ProductKeyM1V1,
  ProductKeyM1V2,
  ProductKeyM2, ProductKeyM2V1, ProductKeyM2V2,
  ProductKeyVI1,
  ProductKeyVI2
} from "@/consts/product";

export function getProductAttributes(key: string) {
  let res:Array<any> = []
  if (!key) return [];
  if (key == ProductKeyM1){
    return getRaem1AttributeOptions()
  }else if (key == ProductKeyM2){
    return getRaem2AttributeOptions()
  }else if (key == ProductKeyVI1){
    return getV1AttributeOptions()
  }else if (key == ProductKeyVI2){
    return getV2AttributeOptions()
  }else if (key == ProductKeyM1V1){
    return getM1V1AttributeOptions()
  }else if (key == ProductKeyM1V2){
    return getM1V2AttributeOptions()
  }else if (key == ProductKeyM2V1){
    return getM2V1AttributeOptions()
  }else if (key == ProductKeyM2V2){
    return getM2V2AttributeOptions()
  }
  return res;
}

const getRaem1AttributeOptions = ()=> {
  const i18nObj = i18n.global
  const attributeOptions = [
    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power"),unit:"KpJ"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},
    {val:'aeDurningTime',label: i18nObj.t("device.ae.ae_durning_time"),unit:"μs"},
    {val:'aeRingingNum',label: i18nObj.t("device.ae.ae_ringing_num"),unit:""},
    {val:'aeRisingTime',label: i18nObj.t("device.ae.ae_rising_time"),unit:"μs"},
    {val:'aeRisingNum',label: i18nObj.t("device.ae.ae_rising_num"),unit:""},
    {val:'aePeakFreq',label:i18nObj.t("device.ae.ae_peak_freq"),unit:"kHz"},
    {val:'aeCentroidFre',label: i18nObj.t("device.ae.ae_centroid_fre"),unit:"kHz"},
    {val:'aeFre1BandPro',label: i18nObj.t("device.ae.ae_fre1_band_pro"),unit:""},
    {val:'aeFre2BandPro',label: i18nObj.t("device.ae.ae_fre2_band_pro"),unit:""},
    {val:'aeFre3BandPro',label: i18nObj.t("device.ae.ae_fre3_band_pro"),unit:""},
    {val:'aeFre4BandPro',label: i18nObj.t("device.ae.ae_fre4_band_pro"),unit:""},
    {val:'aeFre5BandPro',label: i18nObj.t("device.ae.ae_fre5_band_pro"),unit:""},
  ]
  return attributeOptions
}

const getRaem2AttributeOptions = ()=> {
  const i18nObj = i18n.global
  const attributeOptions = [
    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power2"),unit:"pW"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},
  ]
  return attributeOptions
}

export function getV1AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [
    {val:'viMaxAccZ',label:i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:i18nObj.t("device.vi.vi_angle"),unit:"°"},
    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}

export function getV2AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [
    {val:'viMaxAccZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:"[Z]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccX',label:"[X]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqX',label:"[X]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakX',label:"[X]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestX',label:"[X]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseX',label:"[X]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormX',label:"[X]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowX',label:"[X]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewX',label:"[X]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisX',label:"[X]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceX',label:"[X]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleX',label:"[X]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccY',label:"[Y]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceY',label:"[Y]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleY',label:"[Y]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}


export function getM1V1AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [

    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power"),unit:"KpJ"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},
    {val:'aeDurningTime',label: i18nObj.t("device.ae.ae_durning_time"),unit:"μs"},
    {val:'aeRingingNum',label: i18nObj.t("device.ae.ae_ringing_num"),unit:""},
    {val:'aeRisingTime',label: i18nObj.t("device.ae.ae_rising_time"),unit:"μs"},
    {val:'aeRisingNum',label: i18nObj.t("device.ae.ae_rising_num"),unit:""},
    {val:'aePeakFreq',label:i18nObj.t("device.ae.ae_peak_freq"),unit:"kHz"},
    {val:'aeCentroidFre',label: i18nObj.t("device.ae.ae_centroid_fre"),unit:"kHz"},
    {val:'aeFre1BandPro',label: i18nObj.t("device.ae.ae_fre1_band_pro"),unit:""},
    {val:'aeFre2BandPro',label: i18nObj.t("device.ae.ae_fre2_band_pro"),unit:""},
    {val:'aeFre3BandPro',label: i18nObj.t("device.ae.ae_fre3_band_pro"),unit:""},
    {val:'aeFre4BandPro',label: i18nObj.t("device.ae.ae_fre4_band_pro"),unit:""},
    {val:'aeFre5BandPro',label: i18nObj.t("device.ae.ae_fre5_band_pro"),unit:""},

    {val:'viMaxAccZ',label:i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:i18nObj.t("device.vi.vi_angle"),unit:"°"},
    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}


export function getM1V2AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [

    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power"),unit:"KpJ"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},
    {val:'aeDurningTime',label: i18nObj.t("device.ae.ae_durning_time"),unit:"μs"},
    {val:'aeRingingNum',label: i18nObj.t("device.ae.ae_ringing_num"),unit:""},
    {val:'aeRisingTime',label: i18nObj.t("device.ae.ae_rising_time"),unit:"μs"},
    {val:'aeRisingNum',label: i18nObj.t("device.ae.ae_rising_num"),unit:""},
    {val:'aePeakFreq',label:i18nObj.t("device.ae.ae_peak_freq"),unit:"kHz"},
    {val:'aeCentroidFre',label: i18nObj.t("device.ae.ae_centroid_fre"),unit:"kHz"},
    {val:'aeFre1BandPro',label: i18nObj.t("device.ae.ae_fre1_band_pro"),unit:""},
    {val:'aeFre2BandPro',label: i18nObj.t("device.ae.ae_fre2_band_pro"),unit:""},
    {val:'aeFre3BandPro',label: i18nObj.t("device.ae.ae_fre3_band_pro"),unit:""},
    {val:'aeFre4BandPro',label: i18nObj.t("device.ae.ae_fre4_band_pro"),unit:""},
    {val:'aeFre5BandPro',label: i18nObj.t("device.ae.ae_fre5_band_pro"),unit:""},

    {val:'viMaxAccZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:"[Z]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccX',label:"[X]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqX',label:"[X]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakX',label:"[X]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestX',label:"[X]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseX',label:"[X]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormX',label:"[X]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowX',label:"[X]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewX',label:"[X]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisX',label:"[X]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceX',label:"[X]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleX',label:"[X]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccY',label:"[Y]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceY',label:"[Y]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleY',label:"[Y]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}


export function getM2V1AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [

    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power2"),unit:"pW"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},

    {val:'viMaxAccZ',label:i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:i18nObj.t("device.vi.vi_angle"),unit:"°"},
    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}



export function getM2V2AttributeOptions(){
  const i18nObj = i18n.global
  const attributeOptions = [

    {val:'aeAmp',label: i18nObj.t("device.ae.ae_amp"),unit:"dB"},
    {val:'aeAsl',label: i18nObj.t("device.ae.ae_asl"),unit:"dB"},
    {val:'aePower',label: i18nObj.t("device.ae.ae_power2"),unit:"pW"},
    {val:'aeRms',label: i18nObj.t("device.ae.ae_rms"),unit:"mV"},

    {val:'viMaxAccZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsZ',label:"[Z]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceZ',label:"[Z]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleZ',label:"[Z]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccX',label:"[X]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqX',label:"[X]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakX',label:"[X]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageX',label:"[X]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestX',label:"[X]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseX',label:"[X]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormX',label:"[X]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowX',label:"[X]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewX',label:"[X]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisX',label:"[X]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqX',label:"[X]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsX',label:"[X]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceX',label:"[X]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleX',label:"[X]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viMaxAccY',label:"[Y]"+i18nObj.t("device.vi.vi_max_acc"),unit:"m/s²"},
    {val:'viMaxAccfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_max_accfreq"),unit:"Hz"},
    {val:'viAccPeakY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_peak"),unit:"m/s²"},
    {val:'viAccAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average"),unit:"m/s²"},
    {val:'viAccAbsAverageY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_abs_average"),unit:"m/s²"},
    {val:'viAccRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms"),unit:"m/s²"},
    {val:'viAccVarY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var"),unit:"m/s²"},
    {val:'viAccStdY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std"),unit:"m/s²"},
    {val:'viAccCrestY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_crest"),unit:""},
    {val:'viAccPulseY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_pulse"),unit:""},
    {val:'viAccFormY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_form"),unit:""},
    {val:'viAccAllowY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_allow"),unit:""},
    {val:'viAccSkewY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_skew"),unit:""},
    {val:'viAccKurtosisY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_kurtosis"),unit:""},
    {val:'viAccAverageFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_average_freq"),unit:"Hz"},
    {val:'viAccCentroidFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_centroid_freq"),unit:"Hz"},
    {val:'viAccRmsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_rms_freq"),unit:"Hz"},
    {val:'viAccMsFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_ms_freq"),unit:"Hz"},
    {val:'viAccVarFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_var_freq"),unit:"Hz"},
    {val:'viAccStdFreqY',label:"[Y]"+i18nObj.t("device.vi.vi_acc_std_freq"),unit:"Hz"},
    {val:'viVelocityMaxY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_max"),unit:"mm/s"},
    {val:'viVelocityMaxfreqY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_maxfreq"),unit:"Hz"},
    {val:'viVelocityRmsY',label:"[Y]"+i18nObj.t("device.vi.vi_velocity_rms"),unit:"mm/s"},
    {val:'viMaxDistanceY',label:"[Y]"+i18nObj.t("device.vi.vi_max_distance"),unit:"μm"},
    {val:'viAngleY',label:"[Y]"+i18nObj.t("device.vi.vi_angle"),unit:"°"},

    {val:'viTemperature',label:i18nObj.t("device.vi.vi_temperature"),unit:"°c"},
    {val:'viVoltage',label:i18nObj.t("device.vi.vi_voltage"),unit:"V"},
  ]
  return attributeOptions
}
